package koction.model.admin;

import java.util.List;

import javax.annotation.Resource;

import koction.model.consumer.ConsumerVO;
import koction.model.product.ProductVO;
import koction.model.seller.SellerDao;
import koction.model.question.QuestionBoardVO;
import koction.model.seller.SellerVO;

import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
	@Resource(name="adminDaoImpl")
	private AdminDao adminDao;
	@Resource(name="sellerDaoImpl")
	private SellerDao sellerDao;
	
	@Override
	public AdminVO adminLogin(AdminVO avo) {
		return this.adminDao.adminLogin(avo);
	}

	@Override
	public List<AskSellerVO> responseSellerView() {
		return this.adminDao.responseSellerView();
	}

	@Override
	public void responceSeller(AskSellerVO asvo) {
		adminDao.registerSeller(asvo);
		adminDao.deleteAskSeller(asvo);
	}

	@Override
	public List<ConsumerVO> getAllConsumerList() {
		return this.adminDao.getAllConsumerList();
	}

	@Override
	public SellerVO findSellerByConsumerId(String id) {
		return this.adminDao.findSellerByConsumerId(id);
	}

	@Override
	public List<SellerVO> getAllSellerList() {
		return this.adminDao.getAllSellerList();
	}

	@Override
	public List<ProductVO> getProductList(SellerVO svo) throws Exception {
		return this.sellerDao.getProductList(svo);
	}

	@Override
	public SellerVO salesVolumeStatisticsView(String sellerId) {
		return this.sellerDao.salesVolumeStatisticsView(sellerId);
	}
	
	@Override
	public void responseSellerCancle(String id) {
		this.adminDao.responseSellerCancle(id);
	}
	@Override
	public List<ProductVO> adminGetProductList() {
		return this.adminDao.adminGetProductList();
	}

	@Override
	public List<ProductVO> adminGetSalesVolumeList() {
		return this.adminDao.adminGetSalesVolumeList();
	}

	@Override
	public List<ProductVO> adminGetSalesProfitList() {
		return this.adminDao.adminGetSalesProfitList();
	}

	@Override
	public List<ProductVO> findProductName(String productName) {
		return this.adminDao.findProductName(productName);
	}
	
	@Override
	public List<QuestionBoardVO> getQuestionBoard() {
		return this.adminDao.getQuestionBoard();
	}

	@Override
	public void deleteBoard(int no) {
		this.adminDao.deleteBoard(no);
		
	}

	@Override
	public List<ProductVO> salesVolumeContentView(String sellerId) {
		return this.adminDao.salesVolumeContentView(sellerId);
	}

	@Override
	public List<ProductVO> salesPriceContentView(String sellerId) {
		return this.adminDao.salesPriceContentView(sellerId);
	}

}
